Conversation
Instead of spawning a goroutine for each wild pokemon that sleeps waiting for an encounter, use a single pending queue with a background sweeper. This reduces memory pressure and goroutine overhead under high load. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflicts by keeping typed webhook structs from json_structure while using dirty flag pattern (oldValues, newRecord) for change detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nto dirtyflag_prototype
Feat: reduce updates config
# Conflicts: # decoder/weather_iv.go
|
Does this cope with geofence reloads? |
|
Thanks, that's a good point. I managed to forget we have reload on geofence - It wouldn't crash, but there was a race. Fixed with last commit. |
Review feedback1.
|
|
(I asked claude to review in a form that you could feed straight to your AI :-) |
|
@jfberry :) done |

Create a cellIds>areaName mapping for all geofence areas we load (excluding cells on fence edges).
On each lookup try to use cellId to get area names and fallback to rtree when not found.
At example, I used 10MB geofence file, lookup table is taking 616MB and CPU usage goes ~2.5 times down. Startup is delayed by ~15 seconds to pregenerate all cellids.
To test make changes to config
Test output (interesting part)